.PHONY:all
all: tcpserverd tcpclient

tcpserverd:TcpServer.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp -lpthread
tcpclient:TcpClient.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp -lpthread

.PHONY:output
output:
	@mkdir output
	@mkdir -p output/bin
	@mkdir -p output/conf
	@mkdir -p output/log
	@cp tcpserverd output/bin
	@cp tcpclient output/bin 
	@cp test.conf output/conf
	@cp install.sh output/
	@cp uninstall.sh output/
	@tar czf output.tgz output

.PHONY:clean
clean:
	rm -f tcpserverd tcpclient output